package com.zipeng.service;

import com.zipeng.spring.annotation.Autowired;
import com.zipeng.spring.annotation.Component;
import com.zipeng.spring.myinterface.BeanNameAware;
import com.zipeng.spring.myinterface.InitializingBean;

@Component("userService")
public class UserServiceImpl implements BeanNameAware, InitializingBean, UserService {
    @Autowired
    private OrderService orderService;

    private String beanName;

    private String testBeanPostProcessor;

    public void testAutowired(){
        System.out.println(orderService);
    }

    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("初始化，自定义逻辑。。。");
    }

    public void setTestBeanPostProcessor(String testBeanPostProcessor) {
        this.testBeanPostProcessor = testBeanPostProcessor;
    }
}
